<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta charset="UTF-8">
		<title>微站_共富网_Gofull.com.cn</title>
		<script src="/v3/js/jquery-1.10.2.min.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="/v3/css/wstyle.css">
		<link type="text/css" rel="stylesheet" href="/v3/css/account.css">
	</head>
	<body>
		<div id="wrap">
			<div class="login_input">
				<div class="r_line">
				<i class="icon-pNum"></i>
				</div>
				<div class="in_put">
					<form action="/wchatLoginInit.do" method="POST" id="loginInitForm">
						<input placeholder="请输入手机号码" id="mobile" name="mobile" maxlength="11" type="tel">
					</form>
				</div>
			</div>
			<div class="point" style="display:none">请输入正确的手机号码</div>
			<div class="zcxy"><a href="#">查看用户协议<i class="icon-zcxy"></i></a></div>
			<div class="Nxt-btn"><a href="javascript:goNext()">下一步</a></div>
			
			<section id="zhezhao" class="zhezhao"></section>
			<div id="showTs" class="showTs">
				<div class="tishi">
				<h1>提示</h1>
				<p id="message-tishi"></p>
				<span id="sure-bt">确定</span>
				</div>
			</div>
		</div>
		<jsp:include page="/include/v3/footer.jsp"></jsp:include>
	</body>

<script type="text/javascript">
var bto = document.getElementById('sure-bt');
bto.onclick = function (){
	hideAlert();
};
	
function checkTelephone(mobile){
	var reg = "^((13[0-9])|(15[^4,\\D])|17[0678]|(18[0-9]))\\d{8}$";
	var isMobel = new RegExp(reg).test(mobile);
	if(!isMobel){
         showAlert("您输入的手机号有误，请重新输入");
		return false;
	}else{
		return true;
	}
}

function showAlert(str){
		$("#zhezhao").show();
		$("#showTs").show();
		$("#error-tip").html(str);
 }

 $("#sure-bt").click(function (){
		hideAlert();
 });

 function hideAlert(){		 
		$("#zhezhao").hide();
		$("#showTs").hide();

}
function goNext(){
	 var mobile = $("#mobile").val();
	 if(checkTelephone(mobile)){
		 $("#loginInitForm").submit();
	 }
}
</script>
</html>
